\section{model::model\_\-class Class Reference}
\label{classmodel_1_1model__class}\index{model::model_class@{model::model\_\-class}}
This class contains all the music-clients.  


{\tt \#include $<$model\_\-class.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{model\_\-class} ()\label{classmodel_1_1model__class_44c2ae577638449395dc99ada0ae04d5}

\item 
\bf{model\_\-class} (const list$<$ \bf{model::client} $>$ \&l)
\begin{CompactList}\small\item\em \doxyref{model\_\-class}{p.}{classmodel_1_1model__class} creates the \doxyref{model\_\-class}{p.}{classmodel_1_1model__class} \item\end{CompactList}\item 
\bf{$\sim$model\_\-class} ()\label{classmodel_1_1model__class_0a74e39317d59ec4374c1d6f0c59bfd8}

\item 
const list$<$ \bf{model::client} $>$ \& \bf{get\_\-clients} () const \label{classmodel_1_1model__class_a3a4d5149f8fd3dd1344b727d6db360f}

\begin{CompactList}\small\item\em get\_\-clients returns the list of clients. \item\end{CompactList}\item 
list$<$ \bf{model::client} $>$ \& \bf{get\_\-clients} ()\label{classmodel_1_1model__class_15ab36c8158ab4e6a36766e755a95bda}

\begin{CompactList}\small\item\em get\_\-clients returns the list of clients. \item\end{CompactList}\item 
void \bf{set\_\-clients} (const list$<$ \bf{model::client} $>$ \&c)\label{classmodel_1_1model__class_177b1ad01e8c488198f4f1079f7fd742}

\begin{CompactList}\small\item\em set\_\-clients sets a list of clients \item\end{CompactList}\item 
boost::shared\_\-ptr$<$ boost::mutex $>$ \bf{get\_\-mutex} ()\label{classmodel_1_1model__class_1434b4de3fa52a25bf54bd3b579bc9f1}

\begin{CompactList}\small\item\em get\_\-mutex returns the mutex of the music-model \item\end{CompactList}\item 
\bf{model::title} $\ast$ \bf{find\_\-title} (const string \&file)
\begin{CompactList}\small\item\em find\_\-title finds the apriopriate title \item\end{CompactList}\item 
\bf{model::title} $\ast$ \bf{find\_\-title} (const string \&file, \bf{model::client} $\ast$c)
\begin{CompactList}\small\item\em find\_\-title finds a title \item\end{CompactList}\item 
\bf{model::client} $\ast$ \bf{find\_\-client} (const string \&name)
\begin{CompactList}\small\item\em find\_\-client finds a client \item\end{CompactList}\item 
boost::shared\_\-ptr$<$ \bf{model::dom} $>$ \bf{to\_\-dom} () const 
\begin{CompactList}\small\item\em to\_\-dom converts the music-model to a dom-structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This class contains all the music-clients. 



Definition at line 38 of file model\_\-class.h.

\subsection{Constructor \& Destructor Documentation}
\index{model::model_class@{model::model\_\-class}!model_class@{model\_\-class}}
\index{model_class@{model\_\-class}!model::model_class@{model::model\_\-class}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}model::model\_\-class::model\_\-class (const list$<$ \bf{model::client} $>$ \& {\em l})\hspace{0.3cm}{\tt  [inline]}}\label{classmodel_1_1model__class_e22eceded4492e0bb5fa2f81af1b40f4}


\doxyref{model\_\-class}{p.}{classmodel_1_1model__class} creates the \doxyref{model\_\-class}{p.}{classmodel_1_1model__class} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em l}]is a list of model-clients \end{description}
\end{Desc}


Definition at line 46 of file model\_\-class.h.

\begin{Code}\begin{verbatim}46 :_clients(l) {}
\end{verbatim}\end{Code}




\subsection{Member Function Documentation}
\index{model::model_class@{model::model\_\-class}!find_client@{find\_\-client}}
\index{find_client@{find\_\-client}!model::model_class@{model::model\_\-class}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{model::client} $\ast$ model::model\_\-class::find\_\-client (const string \& {\em name})}\label{classmodel_1_1model__class_7d893356776ad53ad74f4070a66116ef}


find\_\-client finds a client 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]is the name of the client\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the client is returned. If nothing was found 0 is returned. \end{Desc}


Definition at line 66 of file model\_\-class.cpp.

\begin{Code}\begin{verbatim}67 {
68         model::client *ptr = 0;
69         for(list<model::client>::iterator i  = _clients.begin();
70             i != _clients.end(); ++i) {
71                 if(i->get_name() == str) {
72                         ptr = &(*i);
73                 }
74         }
75         return ptr;
76 }
\end{verbatim}\end{Code}


\index{model::model_class@{model::model\_\-class}!find_title@{find\_\-title}}
\index{find_title@{find\_\-title}!model::model_class@{model::model\_\-class}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{model::title} $\ast$ model::model\_\-class::find\_\-title (const string \& {\em file}, \bf{model::client} $\ast$ {\em c})}\label{classmodel_1_1model__class_2ce04ea06cc2055d66030c2d01050535}


find\_\-title finds a title 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]is the file of the title \item[{\em c}]is the client from which the title come from\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to a title is returned. If nothing was found 0 is returned. \end{Desc}


Definition at line 50 of file model\_\-class.cpp.

\begin{Code}\begin{verbatim}52 {
53         model::title *ptr = 0;
54 
55         for(list<model::interpreter>::iterator i  = 
56             clt->get_interpreters().begin();
57             i != clt->get_interpreters().end(); ++i) {
58                 ptr = find_title(file, &(*i));
59                 if(ptr) {
60                         break;
61                 }
62         }
63         return ptr;
64 }
\end{verbatim}\end{Code}


\index{model::model_class@{model::model\_\-class}!find_title@{find\_\-title}}
\index{find_title@{find\_\-title}!model::model_class@{model::model\_\-class}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\bf{model::title} $\ast$ model::model\_\-class::find\_\-title (const string \& {\em file})}\label{classmodel_1_1model__class_0f92541c2a3f05d61719e58db829a436}


find\_\-title finds the apriopriate title 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]is the file of the title\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the title is returned. If nothing was found 0 is returned. \end{Desc}


Definition at line 10 of file model\_\-class.cpp.

\begin{Code}\begin{verbatim}11 {
12         title *t = 0;
13         for(list<model::client>::iterator i = _clients.begin(); 
14             i != _clients.end(); ++i) {
15                 t = find_title(file, &(*i));
16                 if(t != 0) {
17                         return t;
18                 }
19         }
20         return t;
21 }
\end{verbatim}\end{Code}


\index{model::model_class@{model::model\_\-class}!to_dom@{to\_\-dom}}
\index{to_dom@{to\_\-dom}!model::model_class@{model::model\_\-class}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}boost::shared\_\-ptr$<$ \bf{model::dom} $>$ model::model\_\-class::to\_\-dom () const}\label{classmodel_1_1model__class_1230b553f8d8da57da5c0264ac564a8d}


to\_\-dom converts the music-model to a dom-structure. 

\begin{Desc}
\item[Returns:]a shared\_\-ptr to a dom-object is returned. \end{Desc}


Definition at line 86 of file model\_\-class.cpp.

\begin{Code}\begin{verbatim}87 {
88         typedef list<model::client>::const_iterator it;
89         string tmp = "";
90         for(it i = _clients.begin(); i != _clients.end(); ++i) {
91                 tmp += i->to_xml();
92         }
93         model::dom_parser pars;
94         pars.parse(tmp);
95         return pars.get_node();
96 }
\end{verbatim}\end{Code}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
model/model\_\-class.h\item 
model/model\_\-class.cpp\end{CompactItemize}
